package com.liheng.spring;

public class IDWorker {
    private static IDWorker sInstance;
    private static int sCount = 0;

    public static IDWorker getInstance() {
        if(sInstance == null) {
            sInstance = new IDWorker();
        }
        return sInstance;
    }

    private IDWorker() {
    }

    public int getCountAndInc() {
        return sCount++;
    }
}